import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Hello',
      component: HelloWorld
    },
    {
      path: '/test',
      name: 'test',
      component: resolve => require(['../components/page/test.vue'], resolve)
    },
    {
      path: '/writeArticle',
      name: 'writeArticle',
      component: resolve => require(['../components/page/writeArticle.vue'], resolve)
    },
    {
      path: '/articleList',
      name: 'articleList',
      component: resolve => require(['../components/page/articleList.vue'], resolve)
    },
    {
      path: '/articleDetail/:url',
      name: 'articleDetail',
      component: resolve => require(['../components/page/articleDetail.vue'], resolve)
    }
  ]
})
